Learn R Programming

regda (version 1.0)

Regularised maximum likelihood linear discriminant analysis: Regularised maximum likelihood linear discriminant analysis

Description

Regularised maximum likelihood linear discriminant analysis.

Usage

reg.mle.lda(xnew, x, ina, lambda)

Value

A matrix with the predicted group of each observation in "xnew". Every column corresponds to a \(\lambda\) value. If you have just on value of \(\lambda\), then you will have one column only.

Arguments

xnew

A numerical vector or a matrix with the new observations, continuous data.

x

A matrix with numerical data.

ina

A numerical vector or factor with consecutive numbers indicating the group to which each observation belongs to.

lambda

A vector of regularization values \(\lambda\) such as (0, 0.1, 0.2,...).

Author

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

Details

Regularised maximum likelihood linear discriminant analysis is performed. The function is not extremely fast, yet is pretty fast.

See Also

regmlelda.cv

Examples

Run this code
x <- as.matrix(iris[, 1:4])
ina <- iris[, 5]
a <- reg.mle.lda(x, x, ina, lambda = seq(0, 1, by = 0.1) )

Run the code above in your browser using DataLab